<template>
  <div class="box">
    <div class="box_main">
      <div class="box_name">
        <div class="box_name_top">
          <div class="bnt_lf">{{details.postName}}</div>
          <div class="bnt_lr">{{details.salary}}</div>
        </div>
        <div class="box_name_txt overflowEllipsis">
          <i class="icon iconfont icon-bianji"></i>{{details.workAddr}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <i class="icon iconfont icon-bianji"></i>{{details.workYear}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <i class="icon iconfont icon-bianji"></i>{{details.education | educationFir}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        </div>
      </div>
      <div class="box_zy_txt">
        <div class="box_zy_txt_title">职位描述：</div>
        <div class="box_zy_txt_txt" v-html="details.postDescription"></div>
      </div>
      <div class="box_jn">
        <div class="box_zy_txt_title box_pd13">技能要求：</div>
        <div class="box_jn_main">
          <span class="box_jn_main_item" v-for="(e,i) in jnList" :key="i">
            {{ e }}
          </span>
        </div>
      </div>
      <div class="box_dz">
        <div class="box_zy_txt_title box_pd13">工作地址：</div>
        <div class="box_dz_txt overflowEllipsis box_pd13">
          <i class="icon iconfont icon-dizhi"></i>{{details.workAddr}}
        </div>
      </div>
      <div class="box_gs">
        <div class="box_zy_txt_title">公司简介：</div>
        <div class="box_zy_txt_txt" v-html="details.companyIntroduction"></div>
      </div>
      <div class="box_ry">
        <div class="box_zy_txt_title box_pd13">人员匹配：</div>
        <div class="box_ry_list">
          <ul>
            <li class="box_ry_item" v-for="(e,i) in yserList" :key="i">
              <div class="box_ry_item_lf">
                <div class="box_ry_lf_img">
                  <img src="/static/img/11@3x.png" alt="">
                </div>
                <div class="box_ry_lf_name">
                  <div class="box_ry_lf_name1 overflowEllipsis">
                    赵莹莹<i class="icon iconfont icon-bianji"></i>
                  </div>
                  <div class="box_ry_lf_name2 overflowEllipsis">39岁|高中|3年</div>
                  <div class="box_ry_lf_name3 overflowEllipsis">求职岗位：保洁服务、家政</div>
                </div>
              </div>
              <div class="box_ry_item_lr">
                <i class="icon iconfont icon-bianji"></i>
              </div>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <div class="box_but flexVam">
      <div class="bt_vt flexVam">
        电话沟通
      </div>
    </div>
  </div>
</template>
<script>
import taskApi from "../../requestApi/taskApi";
import { Toast } from "mint-ui";
export default {
  components: {},
  data() {
    return {
      options: [
        {
          label: "本科",
          value: "1"
        },
        {
          label: "大专",
          value: "2"
        },
        {
          label: "中专/技校",
          value: "3"
        },
        {
          label: "高中",
          value: "4"
        }
      ],
      jnList: ["擦玻璃", "打扫", "搬运"],
      yserList: [{}],
      details: {}
    };
  },
  created: function() {},
  mounted() {
    let self = this;
    self.baseUserMessageDistributeFun();
    window.getAppgetUserToken = function(val) {
      self.baseUserInfoFun(val);
      self.listFun();
    };
    this.titleFun({
      title: "详情"
    });
  },
  methods: {
    async listFun() {
      let self = this;
      let params = {
        id: this.$route.query.id
      };
      let res = await taskApi.GetApipostinfo(params);
      if (res.statusCode == 200) {
        self.jnList = [];
        self.details = {
          ...res.data
        };
        self.jnList.push(res.data.skillClaim);
        self.listUserFun(res.data.postName);
      } else {
        Toast({
          message: res.statusMessage,
          position: "bottom"
        });
      }
    },
    async listUserFun(key) {
      let self = this;
      let params = {
        page: 1,
        size: 1000,
        key: key
      };
      let res = await taskApi.GetApipjobhuntinguserList(params);
      if (res.statusCode == 200) {
        self.yserList = res.data.records;
      } else {
        Toast({
          message: res.statusMessage,
          position: "bottom"
        });
      }
    }
  },
  filters: {
    educationFir(val) {
      let arr = [
        { name: "初中", id: "0" },
        { name: "职中", id: "1" },
        { name: "高中", id: "2" },
        { name: "高职", id: "3" },
        { name: "大专", id: "4" },
        { name: "本科", id: "5" },
        { name: "研究生", id: "6" },
        { name: "硕士", id: "7" },
        { name: "博士", id: "8" }
      ];
      let str = "";
      arr.forEach(e => {
        if (e.id == val) {
          str = e.name;
        }
      });
      return str;
    }
  },
  watch: {},
  computed: {}
};
</script>
<style scoped>
.bt_vt {
  height: 1.1733rem;
  background: rgba(222, 42, 46, 1);
  border-radius: 0.08rem;
  width: calc(100% - 0.5333rem);
  font-size: 0.4267rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
}
.box_but {
  width: 100%;
  height: 1.8133rem;
  background: rgba(255, 255, 255, 1);
  border: 0.0267rem solid rgba(235, 235, 235, 0.75);
  box-shadow: 0rem -0.0267rem 0.1333rem 0rem rgba(242, 240, 240, 1);
}
.box_ry_lf_name1 i {
  font-size: 0.32rem;
  color: #ccc;
  margin-left: 0.1333rem;
}
.box_ry_lf_name1 {
  font-size: 0.4533rem;
  font-family: PingFang-SC-Bold;
  font-weight: bold;
  color: rgba(85, 84, 84, 1);
  height: 0.5333rem;
  line-height: 0.4533rem;
  width: calc(100% - 0rem);
  margin-top: 0.0533rem;
}
.box_ry_lf_name2 {
  font-size: 0.3467rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(108, 108, 108, 1);
  height: 0.5333rem;
  line-height: 0.4533rem;
  width: calc(100% - 0rem);
  margin-top: 0.0533rem;
}
.box_ry_lf_name3 {
  font-size: 0.3467rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(108, 108, 108, 1);
  margin-top: 0.0267rem;
  height: 0.5333rem;
  line-height: 0.4533rem;
  width: calc(100% - 0rem);
}

.box_ry_lf_name {
  margin-left: 0.3467rem;
  width: calc(100% - 2.1333rem);
}
.box_ry_lf_img {
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.0267rem;
}
.box_ry_lf_img img {
  width: 100%;
  height: 100%;
}
.box_ry_item_lf {
  width: calc(100% - 1.0667rem);
  height: 1.7067rem;
  display: flex;
}
.box_pd13 {
  padding-left: 0.3467rem;
}
.box_ry_item_lr {
  width: 0.5333rem;
}
.box_ry_item_lr i {
  font-size: 0.3733rem;
  color: #ccc;
}
.box_ry_item {
  width: 100%;
  height: 1.7067rem;
  margin-top: 0.5333rem;
  display: flex;
  justify-content: space-between;
}
.box_ry_list {
  width: calc(100% - 0.64rem);
  margin-left: 0.32rem;
}
.box_ry {
  width: 100%;
  border-top: 0.0267rem solid rgba(54, 60, 69, 0.1);
  margin-top: 0.5067rem;
  overflow: hidden;
}
.box_gs {
  width: calc(100% - 0.6933rem);
  margin-left: 0.3467rem;
  overflow: hidden;
}
.box_dz_txt i {
  font-size: 0.3733rem;
  color: #787878;
  margin-right: 0.1333rem;
}
.box_dz_txt {
  height: 0.5333rem;
  line-height: 0.5333rem;
  overflow: hidden;
  font-size: 0.4rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(86, 86, 86, 1);
  margin-top: 0.7467rem;
}
.box_dz {
  height: 3.36rem;
  width: 100%;
  border-top: 0.0267rem solid rgba(54, 60, 69, 0.1);
  border-bottom: 0.0267rem solid rgba(54, 60, 69, 0.1);
  margin-top: 0.5067rem;
  overflow: hidden;
}
.box_jn_main_item {
  border: 0.0267rem solid rgba(181, 181, 181, 1);
  border-radius: 0.08rem;
  height: 0.88rem;
  padding-right: 0.5067rem;
  padding-left: 0.5067rem;
  line-height: 0.88rem;
  font-size: 0.3733rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(115, 115, 115, 1);
  margin-right: 0.4533rem;
  margin-bottom: 0.2667rem;
}
.box_jn_main {
  margin-top: 0.5867rem;
  min-height: 0.88rem;
  width: calc(100% - 0.64rem);
  margin-left: 0.32rem;
  display: flex;
  flex-wrap: wrap;
}
.box_jn {
  margin-top: 0.72rem;
  border-top: 0.0267rem solid rgba(54, 60, 69, 0.1);
  width: 100%;
  overflow: hidden;
  min-height: 2.6667rem;
}
.box_zy_txt_txt {
  margin-top: 0.3733rem;
  font-size: 0.4rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(86, 86, 86, 1);
  line-height: 0.6133rem;
}
.box_zy_txt_title {
  height: 0.5333rem;
  line-height: 0.5333rem;
  margin-top: 0.5333rem;
  font-size: 0.4533rem;
  font-family: PingFang-SC-Bold;
  font-weight: bold;
  color: rgba(62, 62, 62, 1);
}
.box_zy_txt {
  width: calc(100% - 0.6933rem);
  margin-left: 0.3467rem;
}
.box_name_txt {
  display: flex;
  font-size: 0.3733rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(75, 75, 75, 1);
  height: 0.4533rem;
  line-height: 0.4533rem;
  align-items: center;
  margin-top: 0.3467rem;
  overflow: hidden;
  margin-left: 0.3467rem;
}
.box_name_txt i {
  font-size: 0.32rem;
  color: rgba(75, 75, 75, 1);
  margin-right: 0.1333rem;
}
.bnt_lf {
  font-size: 0.6933rem;
  font-family: PingFang-SC-Bold;
  font-weight: bold;
  color: rgba(72, 72, 72, 1);
}
.bnt_lr {
  font-size: 0.4267rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(238, 52, 56, 1);
}
.box_name_top {
  height: 0.7467rem;
  line-height: 0.7467rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4533rem;
  overflow: hidden;
  margin-left: 0.3467rem;
}
.box_name {
  height: 2.56rem;
  width: 100%;
  border-bottom: 0.0267rem solid rgba(54, 60, 69, 0.1);
  overflow: hidden;
}
.box_main {
  width: calc(100% - 0.5333rem);
  margin-left: 0.2667rem;
  overflow: hidden;
  margin-bottom: 1.3333rem;
}
.box {
  background: #fff;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
}
</style>
